/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-17 14:58:28
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-17 15:04:31
 */
import 'package:flutter/material.dart';
import 'package:flutter_data_center/components/animation_text.dart';
import 'package:flutter_data_center/controller/door_controller.dart';
import 'package:flutter_data_center/utills/color_utils.dart';
import 'package:get/get.dart';

class DoorDetailStatistics extends StatelessWidget {
  const DoorDetailStatistics({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => GetBuilder<DoorController>(
        builder: (_controller) => Container(
          height: 100,
          padding: EdgeInsets.symmetric(horizontal: 18, vertical: 15),
          decoration: BoxDecoration(
            color: gColor("E5FDD9"),
            borderRadius: BorderRadius.circular(15),
          ),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text(
                "进入",
                style: TextStyle(
                  fontSize: 18,
                  fontWeight: FontWeight.w500,
                ),
              ),
              Row(
                mainAxisAlignment: MainAxisAlignment.end,
                children: [
                  AnimText(
                    number: _controller.inCount,
                    style: TextStyle(
                      fontSize: 36,
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                  SizedBox(width: 10),
                  Text(
                    "离开",
                    style: TextStyle(
                      fontSize: 13,
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                  SizedBox(width: 8),
                  AnimText(
                    number: _controller.outCount,
                    style: TextStyle(
                      fontSize: 18,
                      color: gColor("#41C200"),
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                  Spacer(),
                  Container(
                    alignment: Alignment.center,
                    width: 50,
                    height: 25,
                    decoration: BoxDecoration(
                      color: gColor("#58FD05"),
                      borderRadius: BorderRadius.circular(15),
                    ),
                    child: Text(
                      "正常",
                      style: TextStyle(
                        fontSize: 13,
                        height: 1,
                      ),
                    ),
                  ),
                ],
              ),
            ],
          ),
        ),
      );
}
